import request from '@/utils/request';

// 会员等级列表
export const userlevelList = params => request({
    url: '/userlevel/list',
    method: 'POST',
    data: params
}).then(res => {
    return res;
});
// 会员等级新增
export const userlevelAdd = params => request({
    url: '/userlevel/add',
    method: 'POST',
    data: params
}).then(res => {
    return res;
});
// 会员等级更新
export const userlevelUpdate = params => request({
    url: '/userlevel/update',
    method: 'POST',
    data: params
}).then(res => {
    return res;
});
// 会员等级详情
export const userlevelDetail = params => request({
    url: '/userlevel/get',
    method: 'GET',
    params
});
// 会员等级删除
export const userlevelDel = params => request({
    url: '/userlevel/del',
    method: 'POST',
    data: params
}).then(res => {
    return res;
});

// 会员等级列表
export const userlevelListAlll = params => request({
    url: '/userlevel/listAll',
    method: 'GET',
    params
});
// 会员等级状态更新
export const userlevelStatus = params => request({
    url: '/userlevel/status/update',
    method: 'POST',
    data: params
}).then(res => {
    return res;
});
//  --------------------导出日志-----------------------
// 导出日志
export const exportList = params => request({
    url: '/business/excel/export/list',
    method: 'POST',
    data: params
}).then(res => {
    return res;
});
//  --------------------排班通知---------------------
// 排班通知列表
export const noticeList = params => request({
    url: '/business/arrange/notice/list',
    method: 'POST',
    data: params
}).then(res => {
    return res;
});
// 排班通知新增
export const noticeAdd = params => request({
    url: '/business/arrange/notice/add',
    method: 'POST',
    data: params
}).then(res => {
    return res;
});
// 排班通知更新
export const noticeUpdate = params => request({
    url: '/business/arrange/notice/update',
    method: 'POST',
    data: params
}).then(res => {
    return res;
});
// 排班通知删除
export const noticeDel = params => request({
    url: '/business/arrange/notice/del',
    method: 'POST',
    data: params
}).then(res => {
    return res;
});
// 排班通知状态
export const noticeStatus = params => request({
    url: '/business/arrange/notice/status/update',
    method: 'POST',
    data: params
}).then(res => {
    return res;
});
// 排班通知详情
export const noticeGet = params => request({
    url: '/business/arrange/notice/get',
    method: 'GET',
    params
});
// 排班推送
export const pushNotice = data => request({
    url: '/business/arrange/notice/log/push',
    method: 'POST',
    data
});
// 通知
export const noticeCreate = data => request({
    url: '/business/arrange/notice/log/create',
    method: 'POST',
    data
});
//  --------------------保护期-----------------------
// 保护期列表
export const protectPeriodList = params => request({
    url: '/business/protectPeriod/list',
    method: 'POST',
    data: params
}).then(res => {
    return res;
});
// 保护期新增
export const protectPeriodAdd = params => request({
    url: '/business/protectPeriod/add',
    method: 'POST',
    data: params
}).then(res => {
    return res;
});
// 保护期更新
export const protectPeriodUpdate = params => request({
    url: '/business/protectPeriod/update',
    method: 'POST',
    data: params
}).then(res => {
    return res;
});
// 保护期删除
export const protectPeriodDel = params => request({
    url: '/business/protectPeriod/del',
    method: 'POST',
    data: params
}).then(res => {
    return res;
});
// 保护期修改状态
export const protectPeriodStatus = params => request({
    url: '/business/protectPeriod/status/update',
    method: 'POST',
    data: params
}).then(res => {
    return res;
});
// 保护期详情
export const protectPeriodGet = params => request({
    url: '/business/protectPeriod/get',
    method: 'GET',
    params
});
// 配置新增
export const configUpdate = params => request({
    url: '/business/settings/add',
    method: 'POST',
    data: params
}).then(res => {
    return res;
});
// 配置查询
export const configGet = () => request({
    url: '/business/settings/get',
    method: 'GET'
});
